<template>
  <div>
    <h4>第六题</h4>
    <button @click="btn">按钮</button>
    <p>我已经活了{{item}}天</p>
  </div>
</template>

<script>

export default {
  data () {
    return {
      item:''
    }
  },
  methods:{
     btn(){
        let t = +new Date('1998-9-23')/1000
        let x = +new Date()/1000
        let time = x - t
        let d = parseInt(time/60/60/24)
        console.log(d);
        this.item = d
    }
  },

}
</script>

<style scoped>

</style>